/*
 +-----------------------------------------------------------------------------------------------+
 | Project : UKAPI
 +-----------------------------------------------------------------------------------------------+
 | Project Description : Universal & Kernel API
 +-----------------------------------------------------------------------------------------------+
 | File Description :
 |   
 |                                                 
 +-----------------------------------------------------------------------------------------------+
 | Licence : MIT Licence
 +-----------------------------------------------------------------------------------------------+
 | Copyright (c) 2006 Olivier Vanhoucke
 | 
 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software 
 | and associated documentation files (the "Software"), to deal in the Software without 
 | restriction, including without limitation the rights to use, copy, modify, merge, publish, 
 | distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the 
 | Software is furnished to do so, subject to the following conditions:
 | 
 | The above copyright notice and this permission notice shall be included in all copies or 
 | substantial portions of the Software.
 | 
 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
 | BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 
 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 
 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 +-----------------------------------------------------------------------------------------------+
*/

#include <ukapi.h>

static callback_t g_kernel_call_stack[] =
{
	task_create,
	null
};

result_t kernel_call( uint32_t kcall_no )
{
	if ( kcall_no >= sizeof( g_kernel_call_stack ) ) // >= ou >?
	{
		return result_abord_e;
	}

	//g_kernel_call_stack[kcall_no]

	return result_ok_e;
}

result_t kernel_init( pkernel_t pkernel )
{
	info_message( info_zone_ukapi_funtion_entry_e, ( "Entry" ) );

	info_message( info_zone_unknown_e, ( "Welcome to UKAPI Kernel version %s (%s)", UKAPI_VERSION, UKAPI_STATUS ) );

	task_manager_init(&global_kernel_task_manager());

	info_message( info_zone_ukapi_funtion_return_e, ( "Leave" ) );

	return result_ok_e;
}

result_t kernel_start()
{
	
}

result_t kernel_stop()
{
	
}

result_t kernel_deinit()
{
	
}